﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MVCPets.Models.ContentModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit Home Content
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
  <script src="<%= Url.Content("~/Content/Js/fck/fckeditor.js") %>" type="text/javascript" ></script>

  <script type="text/javascript">
    window.onload = function () {
      var sBasePath = '<%= Url.Content("~/Content/Js/Fck/") %>';
      var oFCKeditor = new FCKeditor('ContentText', null, null, 'Custom', null);
      oFCKeditor.Height = '400';
      oFCKeditor.BasePath = sBasePath;
      oFCKeditor.ReplaceTextarea();
    }
</script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Edit Home Content</h2>

    <% using (Html.BeginForm()) %>
    <% { %>
    <%= Html.ValidationSummary(true) %>

    <fieldset>
      <legend>Content</legend>
      <%= Html.HiddenFor(model => model.ID) %>
      <%= Html.HiddenFor(model => model.ContentName) %>
      <%= Html.TextAreaFor(model => model.ContentText)%>
      
      <p><input type="submit" value="Save" /></p>
    </fieldset>
  <% } %>
</asp:Content>
